﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

	protected void CreateUserWizard_CreatedUser(object sender, EventArgs e)
	{
		Roles.AddUserToRole(CreateUserWizard.UserName, "Users");
	}

	protected void CreateUserWizard_SendingMail(object sender, MailMessageEventArgs e)
	{
		e.Message.Body = e.Message.Body.Replace("<%Password%>", CreateUserWizard.Password)
		.Replace("<%UserName%>", CreateUserWizard.UserName)
		.Replace("<%WebSite%>", String.Format("{0}{1}", Request.Url.Authority, Request.ApplicationPath));
	}
}
